package com.zgz.underwrite.model;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


/**
 * 产品
 * @author zgz
 *
 */
@Entity
@Table(name="product")
public class Product implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -121322834015840516L;

	@Id 
	@GeneratedValue(generator = "paymentableGenerator")     
	@GenericGenerator(name = "paymentableGenerator", strategy = "assigned")   
	private String SProductCde;
	private String SProductName;
	
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="product")
	private Set<Coverage> coverages;
	
	public String getSProductCde() {
		return SProductCde;
	}
	public void setSProductCde(String productCde) {
		SProductCde = productCde;
	}
	public String getSProductName() {
		return SProductName;
	}
	public void setSProductName(String productName) {
		SProductName = productName;
	}
	public void setCoverages(Set<Coverage> coverages) {
		this.coverages = coverages;
	}
	public Set<Coverage> getCoverages() {
		return coverages;
	}

}
